service dhcp

This command enables the DHCP server on the specified interface or on all Layer 3 interfaces. Use the no form of this command to disable DHCP server on a specific interface or on all Layer 3 interfaces.

Syntax

service dhcp all  
service dhcp gigabitethernet [slot/port.vlanID]
service dhcp vlan <vlan id>

Command

Description

all

Enables/disables all interfaces.

slot/port.vlanID

Defines the GigabitEthernet interface slot and port (Vlan ID is optional).

vlan id

Defines the VLAN interface.

Default

All interfaces are disabled.

Note

This command enables/disables the DHCP server created via the “ip dhcp pool” command.

Related Commands

Ip dhcp pool

The service dhcp command is also available from the interface configuration sub-directory.

Command Mode

Privileged User

Example

This example enables the DHCP server on VLAN 5:

(config data)# service dhcp vlan 5